$(function () {
    selectCodeType("sex");
    selectCodeType("education");
    selectCodeType("personnelType");
})
function personnelAdd() {
    let data1 ={
        personnelNumber:$("#personnelNumber").val(),
        personnelType:$("#personnelType").val(),
        name:$("#username").val(),
        sex:$("#sex").val(),
        age:$("#age").val(),
        education:$("#education").val(),
        graduateSchool:$("#graduateSchool").val(),
        nativeplace:$("#nativeplace").val(),
        location:$("#location").val(),
        phone:$("#phone").val(),
        urgentphone:$("#urgentphone").val()
    }
    let data = myAjax("/personnel/personnelAdd",data1,"post");
    if (data.result==1){
        alert("更新成功");
    }
}
function changePinYin() {
    let username = $("#username").val();
    console.log(username);
    let personnelNumber = pinyin.getFullChars(username);
    personnelNumber="wanxi_java_"+personnelNumber+""
    $("#personnelNumber").val(personnelNumber);
}